<?php

namespace app\system\model;

use think\Model;

class RoleModel extends Model
{
    protected $table = 'role';
    protected $autoWriteTimestamp = true;

    //角色拥有的权限节点
    public function nodes(){
        return $this->belongsToMany('NodeModel','role_node','node_id', 'role_id');
    }
}
